package com.bdcom.autotest.interaction.socket;

import com.bdcom.autotest.util.CUtil;

public class HBThread implements Runnable{

	private volatile boolean endFlag = false ;
	
	DevSocket devSocket  ;
	public HBThread(  DevSocket devSocket  ) {
		this.devSocket  = devSocket;
	}
	
	
	@Override
	public void run() {
		
		while( !endFlag ) {
			
			devSocket.heartbeat();
			
			CUtil.threadsleep(10*1000);
		}
		
	}
	
	public void shutdown() {
		this.endFlag = true;
	}

	
	
	
}
